#!/usr/bin/env python
""" Convert Software-ID to time and vice versa. """

__author__      = "Michael J. Hohmann"
__copyright__   = "Copyright 2017, Linde Material Handling GmbH"
__versio__      = "0.0.1"
__email__       = "michael.hohmann@lind-mh.de"
__status__      = "Prototype"
__date__        = "2017-02-20"

import time

def from_seconds( seconds ):
    obfuscate=['1','2','3','4','5','6','7','8','9','0']
    rv=''
    gmtime=time.gmtime(seconds)
    
    rv+=obfuscate[int(gmtime.tm_mday/10)]
    rv+=obfuscate[int(gmtime.tm_mday%10)]
    
    rv+=obfuscate[int(gmtime.tm_mon/10)]
    rv+=obfuscate[int(gmtime.tm_mon%10)]
    
    rv+=obfuscate[int(gmtime.tm_year/10) %10]
    rv+=obfuscate[int(gmtime.tm_year%10)]

    rv+=obfuscate[int(gmtime.tm_hour/10)]
    rv+=obfuscate[int(gmtime.tm_hour%10)]

    rv+=obfuscate[int(gmtime.tm_min/10)]
    rv+=obfuscate[int(gmtime.tm_min%10)]
    
    rv+=obfuscate[int(gmtime.tm_sec/10)]
    rv+=obfuscate[int(gmtime.tm_sec%10)]
    
    return rv
